//
//  VersionInfoViewController.m
//  CZT_HN_Longrise
//
//  Created by OSch on 16/5/29.
//  Copyright © 2016年 OSch. All rights reserved.
//

#import "VersionInfoViewController.h"

@interface VersionInfoViewController ()

@end

@implementation VersionInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self init_UI];
}

- (void)init_UI
{
    self.title = @"当前版本";
    [self.view insertSubview:self.backViewImages belowSubview:self.logoImage];
    
    NSString *topNoticeString = @"        远程交警定责、线上保险报案、轻松快速理赔，手机轻松一点，一切尽在掌握！";
    NSString *bottomNoticeString = @"深圳市永兴元科技股份有限公司 版权所有                  copyright © 1998-2017 深圳市永兴元科技股份有限公司";
    
    self.versionLabel.text = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
    self.middleNoticeLabel.attributedText = [self setLabelLineSpaceTextString:topNoticeString];
    [self.middleNoticeLabel sizeToFit];
    self.bottomNoticeLabel.text = bottomNoticeString;
    
}

#pragma mark - 设置label间距
- (NSMutableAttributedString *)setLabelLineSpaceTextString:(NSString *)textString
{
    NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc]initWithString:textString];
    NSMutableParagraphStyle *paragraphStyle1 = [[NSMutableParagraphStyle alloc]init];
    [paragraphStyle1 setLineSpacing:6];
    [attributeString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [textString length])];
    
    return attributeString;
}


@end
